<template>
	<view class="container">
		<view class="top-margin"></view>
		<!-- 地址开始 -->
		<view class="address-box">
			<view class="address-top-box">
				<view v-if="allData.mallOrders.delivery == 1" class="address-top-left">
					<image :src="image_hosts + 'img_ziqu.png'" mode="aspectFit" class="shop-icon"></image>
					<view>到店自提</view>
				</view>
				<view v-else class="address-top-left">
					<image src="#" mode="aspectFit" class="shop-icon"></image>
					<view>物流配送</view>
				</view>
				<!-- <view v-if="orderInfo.openPayment == 1 && t > 0" class="address-top-right">剩余{{m}}分钟{{s}}秒</view> -->
			</view>
			<view class="bottom-line-box"><view class="bottom-line"></view></view>
			<view v-if="allData.mallOrders.delivery == 1" class="address-text-box">
				<image :src="image_hosts + 'icon_place_2.png'" mode="aspectFit" class="address-text-left"></image>
				<view class="address-text-right">{{allData.mallOrdersAddress.address}}</view>
			</view>
			<view v-else class="address-text-box">
				<image src="#" mode="aspectFit" class="address-text-left"></image>
				<view class="address-text-right">
					<view>{{orderInfo.receiptName}} {{orderInfo.receiptPhone}}</view>
					<view>{{orderInfo.receiptAddress}}</view>
				</view>
			</view>
			<view v-if="allData.mallOrders.delivery == 1"  class="address-button-box">
				<view @click="callTel(allData.mallOrdersAddress.phone)" class="address-button-tel">电话</view>
				<view @click="openMap(allData.mallOrdersAddress)" class="address-button-gps">导航</view>
			</view>
		</view>
		<!-- 地址结束 -->
		<!-- 商品列表开始 -->
		<view class="group-box">
			<!-- <view class="order-no-text">订单编号：{{orderNo}}</view> -->
			<!-- 中间开始 -->
			<view v-for="(item,index) in allData.ordersGoodsList" class="group-center">
				<view class="group-center-img">
					<image class="center-img" :src="item.goodsImg"></image>
				</view>
				<view class="center-text" style="width: 490rpx;">
					<view class="center-goods-name">{{item.goodsName}}</view>
					<view class="center-button-box">
						<view class="center-num">单位：{{item.goodsUnit}}</view>
						<view class="center-money"><text>销售单价：</text>￥ {{item.saleUnitPrice}}</view>
					</view>
					<view class="center-button-box">
						<view class="num-text">×{{item.goodsNumber}}</view>
					</view>
				</view>
			</view>
			<!-- 中间结束 -->
			<!-- <view class="mail-price">
				<view class="mail-price-title">商品总价：</view>
				<view class="mail-price-text">￥{{allData.orderPrice || 0}}</view>
			</view> -->
			<!-- <view class="bottom-line-box"><view class="bottom-line"></view></view> -->
			<view v-if="allData.mallOrders.delivery == 2" class="mail-price">
				<view class="mail-price-title">运费总价：</view>
				<view class="mail-price-text">￥{{allData.expressFee}}</view>
			</view>
		</view>
		<!-- 商品列表结束 -->
		<!-- 选择积分/优惠券 start -->
		<view v-if="allData.mallOrders.delivery == 1" class="success-tip-text">
			<view class="mail-price">
				<view class="mail-price-title">商品总价：</view>
				<view class="mail-price-text">￥{{allData.mallOrders.goodsTotalPrice || 0}}</view>
			</view>
			<view class="bottom-line-box"><view class="bottom-line"></view></view>
			<view class="mail-price">
				<view class="mail-price-title">优惠券：</view>
				<view @click="showSelectCoupon()" class="mail-num-text">
					<text v-if="selectCouponData.couponNo">-{{selectCouponData.couponAmount}}元 ></text>
					<text v-else>请选择优惠券 ></text>
				</view>
			</view>
			<view class="bottom-line-box"><view class="bottom-line"></view></view>
			<view class="mail-price">
				<view @click="changeSelectIntegral()" class="integral-select">
					<view class="yeji-icon"><view v-if="isUseIntegral"></view></view>
					<view>积分：</view>
				</view>
				<view class="info-input-border-2">
					<input v-if="repay==0" @blur="authIntegral()" v-model="selectIntegral" type="number" style="height: 72upx;line-height: 72upx;" class="uni-input" placeholder="请输入积分" />
					<view v-else>{{selectIntegral}}</view>
				</view>
			</view>
			<view v-if="isUseIntegral" class="money-integral">抵扣{{selectIntegral/100}}元</view>
		</view>
		<!-- 选择积分/优惠券 end -->
		<view class="success-tip-text">
			<view class="mail-price">
				<view class="mail-price-title">订单编号：</view>
				<view class="mail-num-text">{{allData.mallOrders.mallOrderNo || '-'}}</view>
			</view>
			<view class="bottom-line-box"><view class="bottom-line"></view></view>
			<view class="mail-price">
				<view class="mail-price-title">订单时间：</view>
				<view class="mail-num-text">{{allData.mallOrders.createTime || '-'}}</view>
			</view>
		</view>
		<view style="width: 100%;height: 200rpx;"></view>
		<!-- 底部按钮 -->
		<view class="bottom-button">
			  <view :key="buttonKey" @click="submitOrder()" class="button">
				  <text class="unit">￥</text>
				  <text class="num">{{allData.paymentPrice || 0}}</text>
				  立即支付
			  </view>
		</view>
		<!-- 底部按钮 -->
		<!-- 选择优惠券弹窗 - start -->
		<uni-popup ref="selectPopup" type="bottom" background-color="#fff">
			<view class="select-shop-box">
				<view class="header-box">
					<view class=""></view>
					<view class="select-header-text">请选择优惠券</view>
					<uni-icons @click="closeShop" type="closeempty" size="30"></uni-icons>
				</view>
				<view class="shop-select-box-main">
					<view v-if="allData.couponList!=null" v-for="(item,index) in allData.couponList">
						<!-- 可领取 - start -->
						<view @click="toSelectCoupon(item)" class="coupon-info">
							<view class="coupon-text-box">
								<view class="coupon-text-money" :class="item.canUse===1?'coupon-color-on':'coupon-color-off'">
									<view class="coupon-text-money-top">
										<text class="coupon-text-money-top-icon">￥</text>
										<text v-if="item.couponAmount < 10" class="coupon-text-money-top-num">{{item.couponAmount}}</text>
										<text v-else-if="item.couponAmount >= 10 && item.couponAmount < 100" class="coupon-text-money-top-num-1">{{item.couponAmount}}</text>
										<text v-else-if="item.couponAmount >= 100" class="coupon-text-money-top-num-2">{{item.couponAmount}}</text>
									</view>
									<view v-if= 'item.useAmout > 0' class="coupon-text-money-buttom">满{{item.useAmout}}可用</view>
								</view>
								<!-- 中间 -->
								<view class="coupon-center-box">
									<view class="coupon-center-top">{{item.couponName}}</view>
									<view class="coupon-center-bottom">{{item.typeName}}</view>
									<view class="coupon-center-bottom">{{item.couponNo}}</view>
								</view>
							</view>
							<!-- 底部 -->
							<view class="coupon-bottom-box">
								<view class="coupon-bottom-text">有效期：{{item.startTime}} ~ {{item.endTime}}</view>
								<view class="coupon-bottom-text">{{item.shopNames || ''}}</view>
							</view>
							<!-- 选择按钮 -->
							<view v-if="item.canUse===1" class="yeji-icon select-button"><view v-if="item.id == selectCouponData.id"></view></view>
						</view>
					</view>
					<view class="no-data-box" v-if="!allData.couponList">
						<noDataUser title="暂无优惠券"></noDataUser>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 选择优惠券弹窗 - end -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				image_hosts: this.image_host + 'mall/',
				allData:'', // 订单所有数据
				buttonKey:'',
				isLoad: false,
				list:[],
				total:0,
				orderNo:'',
				postData:{
					name:'',
					tel:'',
					region:'',
					page:1,
					pageSize:20
				},
				postDataCoupon:{
					orderNo:'',
					page:1,
					pageSize:20
				},
				submitData:{
					couponNo: "",
					integralNum: 0,
					orderNo: ""
				},
				region: [],
				timer:null, // 定时器对象
				t:1800, // 倒计时时间
				m:0, // 倒计时分钟
				s:0, // 倒计时秒
				allIntegral:0, // 所有可用积分
				selectIntegral:0, // 选择的积分
				allCoupon:0, // 可用优惠券
				isUseIntegral: false, // 是否使用积分
				couponList: [], // 优惠券列表
				selectCouponData: {} ,// 选择的优惠券
				repay:0, // 是否是重新支付
			}
		},
		onLoad(option) {
			this.list = []
			this.postData.page = 1
			if(option.orderNo){
				this.orderNo = option.orderNo
			}else{
				uni.showToast({title:'参数错误',icon:"none",duration:2000})
				return
			}
			// 判断是不是重新支付
			if(option.repay){
				this.repay = option.repay
			}
			this.getOrderInfo()
			// this.getIntegral()
			// this.getUserCoupon()
		},
		methods: {
			// 获取订单详情
			async getOrderInfo() {
			  let postData = {}
			  let res = await this.$javaCircle.doRequest("post", "vs/mall/getOrderInfo?mallOrderNo="+this.orderNo, {}, '', true)
			  if (res.data.code === 0) {
			    this.allData = res.data.data
				this.allData.paymentPrice = res.data.data.mallOrders.goodsTotalPrice
				this.allIntegral = this.allData.userTotalIntegral?this.allData.userTotalIntegral:0
				this.selectIntegral = this.allData.userTotalIntegral?this.allData.userTotalIntegral:0
				if(this.allData.couponList){
					for(let i=0; i<this.allData.couponList.length;i++){
						this.allData.couponList[i].typeName = this.getCouponTypeName(this.allData.couponList[i].couponType)
					}
				}
				// 回显积分数据
				if(this.allData.mallOrders.usePoints>0 && this.repay==1){
					this.isUseIntegral = true
					this.selectIntegral = this.allData.mallOrders.usePoints
				}
				// 回显优惠券数据
				if(this.allData.mallOrders.couponNo!='' && this.repay==1){
					this.selectCouponData.couponNo = this.allData.mallOrders.couponNo
					this.selectCouponData.couponAmount = this.allData.mallOrders.couponAmount
				}
				this.initPrice()
			  }
			},
			// 选择优惠券
			showSelectCoupon(){
				// 判断是不是 重新支付
				if(this.repay==1){
					return
				}
				this.$refs.selectPopup.open()
			},
			// 关闭选择优惠券
			closeShop(){
				this.$refs.selectPopup.close()
			},
			// 改变是否选择使用积分
			changeSelectIntegral(){
				// 判断是不是 重新支付
				if(this.repay==1){
					return
				}
				this.isUseIntegral = !this.isUseIntegral
				this.initPrice()
			},
			// 拨打电话
			callTel(num){
				if(num){
					uni.makePhoneCall({
						phoneNumber:num.toString(),//电话号码
						success:function(e){
							console.log(e);
						},
						fail:function(e){
							console.log(e);			
						}
					})
				}else{
					uni.showToast({title: "当前门店暂无电话",icon: "none",});
				}
			},
			// 导航
			openMap(item){
				if(!item.latitude){
					uni.showToast({title: "暂无门店位置信息",icon: "none",});
					return
				}
				uni.openLocation({
					latitude: Number(item.latitude),
					longitude: Number(item.longitude),
					scale: 15
				});
			},
			// 获取可用积分数
			getIntegral(){
				getShopIntegralAll({}).then(res=>{
					this.allIntegral = res
					this.selectIntegral = res
				})
			},
			// 获取优惠券列表
			getUserCoupon(){
				getCouponByOrder(this.postDataCoupon).then(res=>{
					for(let i=0; i<res.length;i++){
						res[i].typeName = this.getCouponTypeName(res[i].couponType)
					}
					this.couponList = res
				})
			},
			// 获取优惠券名称
			getCouponTypeName(type){
				switch(type){
					case 1:
					return '店铺代金券';
					break;
					case 2:
					return '店铺满减券';
					break;
					case 11:
					return '商品代金券';
					break;
					case 12:
					return '商品满减券';
					break;
				}
			},
			// 选择优惠券
			toSelectCoupon(item){
				// 判断是不是可以选择
				if(item.canUse!=1){
					return false
				}
				// 判断是否点击已选择的券
				if(item.id == this.selectCouponData.id){
					this.selectCouponData = ''
					this.initPrice()
					this.$forceUpdate()
					return
				}
				this.selectCouponData = item
				// this.getChangeData()
				this.$refs.selectPopup.close()
				this.initPrice()
			},
			// 获取重新选择优惠券后的数据
			getChangeData(){
				let taht = this
				let postData = {}
				postData.orderNo = this.orderNo
				postData.couponNo = this.selectCouponData.couponNo
				getChangeCouponInfo(postData).then(res=>{
					// 初始化积分
					this.allIntegral = res.integralNum
					this.selectIntegral = res.integralNum
					taht.$refs.selectPopup.close()
					taht.initPrice()
				})
			},
			// 判断积分
			authIntegral(){
				if(this.selectIntegral <= 0){
					uni.showToast({title: "积分数量请输入大于0的数字",icon: "none",});
					this.selectIntegral = 0
					return
				}
				if(this.selectIntegral > this.allIntegral){
					this.selectIntegral = this.allIntegral
				}
				this.initPrice()
			},
			// 重新计算价格
			initPrice(){
				// 判断是否使用积分
				if(this.isUseIntegral == true){
					let integral = this.selectIntegral/100
					this.allData.paymentPrice = this.Subtr(this.allData.mallOrders.goodsTotalPrice,integral)
				}else{
					this.allData.paymentPrice = this.allData.mallOrders.goodsTotalPrice
				}
				// 判断是否使用优惠券
				if(this.selectCouponData != ''){			
					this.allData.paymentPrice = this.Subtr(this.allData.paymentPrice,this.selectCouponData.couponAmount)
				}
				// 判断是否有运费
				/* if(this.allData.expressFee > 0){
					this.allData.paymentPrice = this.accAdd(this.allData.paymentPrice,this.allData.expressFee)
				} */
				if(this.allData.paymentPrice < 0){
					this.allData.paymentPrice = 0
				}
				this.$forceUpdate()
			},
			// 带浮点数 相减
			Subtr(arg1,arg2){
			    var r1=0,r2=0,m,n,s1=arg1.toString(),s2=arg2.toString();
			    try{
			        if(s1.split(".")[1] != undefined )
			            r1=s1.split(".")[1].length;
			    }catch(e){}
			    try{
			        if(s2.split(".")[1] != undefined )
			            r2=s2.split(".")[1].length;
			    }catch(e){}
			    m=Math.pow(10,Math.max(r1,r2));
			    //last modify by deeka
			    //动态控制精度长度
			    n=(r1>=r2)?r1:r2;
			    return (this.accMul(arg1,m)-this.accMul(arg2,m))/m;
			},
			//乘法
			accMul(arg1,arg2) {
				var m=0,s1=arg1.toString(),s2=arg2.toString();
				try{m+=s1.split(".")[1].length}catch(e){}
				try{m+=s2.split(".")[1].length}catch(e){}
				return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
			},
			// 获取列表
			getList(){
				let postData = {}
				postData.orderNo = this.orderNo
				getCouponOrderInfo(postData).then(res=>{
					for(let i in res.list){
						res.list[i].goodsImg = JSON.parse(res.list[i].goodsImg)
					}
					// 计算倒计时
					let nowTime = Date.parse(new Date())
					if(res.updateTimeUnix){
						this.t =(res.updateTimeUnix - parseInt(nowTime))/1000
						console.log(this.t)
						if(this.t > 0){
							this.resetTime()
						}
					}
					this.allData = res
					// 记录原始的 总计金额
					this.allData.paymentPriceOld = res.orderPrice
					// 初始化积分
					if(res.integralNum > 0){
						this.allIntegral = res.integralNum
						this.selectIntegral = res.integralNum
						this.isUseIntegral = true
					}
					// 初始优惠券
					if(res.couponNo && res.deductionAmount){
						let couponData = {}
						couponData.couponNo = res.couponNo
						couponData.couponAmount = res.deductionAmount
						couponData.id = res.couponNoId
						this.selectCouponData = couponData
					}
					this.list = res.list
					// 初始化金额
					this.initPrice()
				})
			},
			// 提交数据
			async submitOrder(){
				uni.showLoading({title:"订单提交中",mask: true,icon: 'circle'})
				let postData = {}
				postData.mallOrderNo = this.orderNo
				// 判断是否使用积分
				if(this.isUseIntegral == true){
					postData.integral = this.selectIntegral
				}
				// 判断是否使用优惠券
				if(this.selectCouponData != ''){			
					postData.couponNo = this.selectCouponData.couponNo
				}
				postData.repay = this.repay
				let res = await this.$javaCircle.doRequest("post", "vs/mall/payOrder", postData, 'json', true)
				if (res.data.code === 0) {
				  console.log(res)
				  // 如果需要支付金额是0，接口会返回付款成功，直接跳到支付成功页面
				  if(res.data.data == '付款成功'){
				  	this.toOrder()
				  	return
				  }
				  this.toPay(res.data.data)
				}else{
					this.buttonKey++
					uni.hideLoading()
					uni.showToast({icon: 'none',title: res.data.message})
				}
			},
			// 调起支付
			toPay(payConfig){
				console.log(payConfig)
				let _this = this
				uni.requestPayment({
					provider: 'wxpay',    //支付类型-固定值
					timeStamp: payConfig.timeStamp, // 时间戳（单位：秒）
					nonceStr: payConfig.nonceStr, // 随机字符串
					package: payConfig.package, // 固定值
					signType: payConfig.signType, //固定值
					paySign: payConfig.paySign, //签名		
					success: function (res) {
						console.log('success:' + JSON.stringify(res));
						console.log("支付成功");
						uni.showToast({
							icon: 'success',
							title: '支付成功'
						})
						_this.toOrder()
					},		
					fail: function (err) {
						console.log('fail:' + JSON.stringify(err));
						console.log("支付失败");
						uni.showToast({
							icon: 'none',
							title: '支付失败'
						})
						_this.toOrderList()
					}
				});
			},
			// 倒计时
			resetTime(){
				this.m=Math.floor(this.t/60%60);
				this.m<10&&(this.m='0'+this.m);
				this.s=Math.floor(this.t%60);	
				//开启定时任务
				this.timer=setInterval(this.countDown,1000);
			},
			// 定时任务
			countDown(){
				this.s--;
				this.s<10&&(this.s='0'+this.s);
				if(this.s.length>=3){
					this.s=59;
					this.m=(Number(this.m)-1);
					this.m<10&&(this.m='0'+this.m);
				}
				if(this.m.length>=3){
					this.m='00';
					this.s='00';
					//倒计时结束,关闭定时任务。
					clearInterval(this.timer);
				}			     
			},
			// 监听地址选择
			bindRegionChange(e) {
			    console.log('picker发送选择改变，携带值为', e.detail.value)
				let tempData = ''
				for(let i in e.detail.value){
					tempData += e.detail.value[i] + ' '
				}
				this.postData.region = tempData
			},
			// 跳转到详情
			toOrder(){
				uni.reLaunch({
				    url:'/shop/pages/index/paySuccess?orderNo=' + this.orderNo
				});
			},
			// 跳转到 订单列表
			toOrderList(){
				uni.reLaunch({
				    url:'/shop/pages/order/index'
				});
			},
		}
	}
</script>

<style lang="less" scoped>
	.container {
	  width: 100%;
	  height: 100vh;
	  background: #F3F5F8;
	}
	.top-margin{
		width: 100%;
		height: 22rpx;
	}
	/* 头部地址-start */
	.address-box{
		margin: 0 20rpx 0 20rpx;
		padding: 20rpx;
		background-color: #ffffff;
		border-radius: 8rpx;
	}
	.shop-icon{
		width: 42rpx;
		height: 42rpx;
		padding-right: 10rpx;
	}
	.address-top-box{
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;
	}
	.address-top-left{
		display: flex;
		align-items: center;
		font-size: 38rpx;
		color: #5CAE77;
		font-weight: bold;
	}
	.address-top-right{
		font-size: 28rpx;
		color: #FF7E3E;
	}
	.address-text-box{
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 20rpx 0;
	}
	.address-text-left{
		width: 60rpx;
		height: 60rpx;
	}
	.address-text-right{
		width: 568rpx;
		color: #333333;
		font-size: 38rpx;
		font-weight: 400;
	}
	.address-button-box{
		display: flex;
		justify-content: flex-end;
	}
	.address-button-tel{
		width: 190rpx;
		height: 70rpx;
		line-height: 70rpx;
		border-radius: 10rpx;
		text-align: center;
		border: 2rpx solid #5CAE77;
        font-size: 36rpx;
		color: #5CAE77;
		margin-right: 30rpx;
	}
	.address-button-gps{
		width: 190rpx;
		height: 70rpx;
		line-height: 70rpx;
		background: #5CAE77;
		border: 2rpx solid #5CAE77;
		text-align: center;
		border-radius: 10rpx;
		font-size: 36rpx;
		color: #FFFFFF;
	}
	/* 头部地址-end */
	.container {
		font-size: 30rpx;
	}
	.order-no-text{
		background-color: #ffffff;
		font-size: 32rpx;
		font-weight: bold;
		height: 100rpx;
		line-height: 100rpx;
	}
	/* 列表模块开始 */
	.group-box{
		margin: 20rpx 20rpx 0 20rpx;
		padding: 20rpx;
		background-color: #ffffff;
		border-radius: 12rpx;
	}
	/* 中间开始 */
	.group-center{
		display: flex;
		justify-content: flex-start;
	}
	.group-center-img{
		display: flex;
		justify-content: flex-start;
	}
	.center-img{
		width: 156rpx;
		height: 156rpx;
		margin-right: 20rpx;
	}
	.center-text{
		color: #333333;
		font-size: 32rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.center-button-box{
		display: flex;
		justify-content: space-between;
	}
	.center-num{
		font-size: 36rpx;
		color: #888888;
	}
	.center-money{
		color: #333333;
		font-size: 36rpx;
		text{
			font-size: 34rpx;
			color: #888888;
		}
	}
	.num-text{
		width: 100%;
		text-align: right;
		font-size: 36rpx;
		color: #888888;
	}
	.center-goods-name{
		font-size: 38rpx;
		font-weight: bold;
		color: #333333;
		overflow: hidden; //超出的文本隐藏	
		text-overflow: ellipsis; //溢出用省略号显示	
		display: -webkit-box;	
		-webkit-line-clamp: 1; // 超出多少行		
		-webkit-box-orient: vertical;
	}
	/* 中间结束 */
	/* 列表模块结束 */
	.bottom-button{
		position: fixed;
		bottom: 0;
		left: 0;
		display:flax;
		justify-content: center;
		background-color: #ffffff;
		padding:32rpx 32rpx 60rpx 32rpx;
		.button{
			width: 686rpx;
			height: 98rpx;
			line-height:98rpx;
			background: #5CAE77;
			border-radius: 14rpx;
			font-size: 44rpx;
			font-weight: 500;
			color: #FFFFFF;
			text-align: center;
		}
		.unit{
			font-size: 30rpx;
		}
		.num{
			padding-right: 20rpx;
		}
	}
	.success-box{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 380rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
		margin: 20rpx;
	}
	.success-text{
		font-size: 38rpx;
		height: 100rpx;
		line-height: 100rpx;
		font-weight: bold;
	}
	.success-tip-text{
		margin: 20rpx;
		padding: 20rpx;
		font-size: 32rpx;
		line-height: 50rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
	}
	.bottom-line-box{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.bottom-line{
		width: 654rpx;
		height: 1rpx;
		background: #F1F1F1;
	}
	.mail-price{
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #ffffff;
		height: 114rpx;
		line-height: 114rpx;
	}
	.mail-price-title{
		font-size: 36rpx;
		color: #666666;
	}
	.integral-select{
		display: flex;
		align-items: center;
	}
	.yeji-icon{
		width: 38upx;
		height: 38upx;
		border-radius: 50%;
		border: 2upx solid #5CAE77;
		margin-right: 20upx;
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
	}
	.yeji-icon view{
		width: 19upx;
		height: 19upx;
		border-radius: 50%;
		background-color: #5CAE77;
	}
	.mail-price-text{
		font-size: 40rpx;
		color: #FD4400;
		font-weight: bold;
	}
	.mail-num-text{
		font-size: 36rpx;
		color: #333333;
	}
	.group-bottom-box{
		position: fixed;
		bottom: 0;
		width: 750rpx;
		height: 104rpx;
		line-height: 104rpx;
		font-size: 40rpx;
		text-align: center;
		color: #ffffff;
		display: flex;
		justify-content: center;
		background-color: #ffffff;
		padding: 30rpx 0;
		z-index: 2;
	}
	.submit-button-box{
		display: flex;
		justify-content: center;
	}
	.submit-button-left{
		width: 438rpx;
		color: #333333;
		border: 1rpx solid #FD4400;
		border-radius: 50rpx 0 0 50rpx;
	}
	.submit-button-right{
		width: 268rpx;
		background-color: #FD4400;
		color: #ffffff;
		border: 1rpx solid #FD4400;
		border-radius: 0 50rpx 50rpx 0;
	}
	.info-input-border-2{
		display: flex;
		justify-content: center;
		align-items: center;
		width: 300upx;
		height: 75rpx;
		padding-left: 10upx;
		border: 1upx solid #dcdfe6;
	}
	/* 选择弹窗-start */
	.select-shop-box{
		width: 750rpx;
		height: calc(100vh - 100rpx);
	}
	.shop-select-box-main{
		height: calc(100vh - 300rpx);
		background-color: #F5F5F6;
		overflow-y: scroll;
	}
	.header-box{
		display: flex;
		justify-content: space-between;
		padding: 30rpx 20rpx;
		border-bottom: 1rpx solid #f1f1f1;
		background-color: #f1f1f1;
	}
	.select-header-text{
		font-size: 38rpx;
		font-weight: bold;
	}
	.shop-list-box{
		padding: 0 30rpx;
		border-bottom: 1rpx solid #f1f1f1;
	}
	.goods-list-box{
		height: 100rpx;
		line-height: 100rpx;
		padding-left: 30rpx;
	}
	.shop-x-text{
		text-align: left;
	}
	/* 选择弹窗-end */
	/* 优惠券 - start */
	.coupon-info{
		position:relative;
		margin: 36rpx 36rpx 0 36rpx;
		width: 678rpx;
		height: 270rpx;
		background: url('https://tousubiaoyang-1301970825.file.myqcloud.com/tg1670570842942.png')  no-repeat;
		background-size:100% 100%;
		box-sizing: border-box;
	}
	.select-button{
		position: absolute;
		right: 20rpx;
		top: 90rpx;
	}
	.coupon-text-box{
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.coupon-color-on{
		color: #FF6E19;
	}
	.coupon-color-off{
		color: #999999;
	}
	.coupon-text-money{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		font-weight: bold;
		width: 260rpx;
		height: 191rpx;
		text-align: center;
	}
	.coupon-text-money-top{
	}
	.coupon-text-money-top-icon{
		font-size: 32rpx;
	}
	.coupon-text-money-top-num{
		font-size: 70rpx;
	}
	.coupon-text-money-top-num-1{
		font-size: 60rpx;
	}
	.coupon-text-money-top-num-2{
		font-size: 34rpx;
	}
	.coupon-text-money-buttom{
		font-size: 26rpx;
		text-align: center;
	}
	.coupon-text-line{
		width: 1rpx;
		height: 110rpx;
		border-left: 1rpx dashed #FF6800;
	}
	.coupon-text-line-no{
		width: 1rpx;
		height: 110rpx;
		border-left: 1rpx dashed #999999;
	}
	.coupon-center-box{
		display: flex;
		flex-direction: column;
		justify-content: center;
		text-align: left;
		padding: 0 20rpx;
	}
	.coupon-center-top{
		width: 432rpx;
		font-size: 36rpx;
		font-weight: bold;
		overflow: hidden; //超出的文本隐藏
		text-overflow: ellipsis; //溢出用省略号显示	
		display: -webkit-box;	
		-webkit-line-clamp: 1; // 超出多少行		
		-webkit-box-orient: vertical;
		color: #333333;
	}
	.coupon-center-bottom{
		font-size: 26rpx;
		color: #888888;
		line-height: 50rpx;
	}
	.coupon-bottom-box{
		display: flex;
		justify-content: space-between;
		font-size: 24rpx;
		color: #888888;
		line-height: 80rpx;
		padding: 0 20rpx;
	}
	/* 优惠券 - end */
	.money-integral{
		color: #FD4400;
		text-align: right;
	}
</style>
